<?php
if ($data->users->profiles[0]->photo <> "") {
    $imgsrc = baseUrl() . '../../' . getUploadDir() . $data->users_id . '/profile/minithumb/' . $data->users->profiles[0]->photo;
} else {
    $imgsrc = baseUrl() . '../../upload/default-mini.png';
}
?>
<ol>
    <li <?php echo ($index % 2 == 0) ? '' : 'class="adminComment"'; ?>>
        <div class="padding">
            <div class="user-info borB">                 	
                <p><img class="user-img" src="<?php echo $imgsrc; ?>" /> 
                    <?php
                    echo (!empty($data->users->profiles[0]->first_name)) ? $data->users->profiles[0]->first_name : '';
                    echo '   ' . (!empty($data->users->profiles[0]->last_name)) ? $data->users->profiles[0]->last_name : '';
                    ?><span class="commentDateStamp"><?php echo $data->create_time; ?></span>
                </p>
                <h5><?php echo (!empty($data->classes->class_titile)) ? WORK_SHOP_NAME . ' ' . $data->classes->class_titile : COURSE_NAME . ' ' . $data->courses->course_titile; ?></h5>
            </div>
            <div class="comment"> 
                <b>Message:</b><br/>
                <p><?php echo $data->reviews_text; ?></p>
            </div>
        </div>
    </li>

</ol>
